Skip to content

Add IPv6 support#10

Merged
adrelanos merged 6 commits into
Whonix:masterfrom
DanWin:ip6
Sep 13, 2025
Merged

Add IPv6 support#10
adrelanos merged 6 commits into
Whonix:masterfrom
DanWin:ip6

Conversation

@DanWin

@DanWin DanWin commented Oct 11, 2024

Copy link
Copy Markdown
Contributor

This pull request adds IPv6 support

Mandatory Checklist

  • Legal agreements accepted. By contributing to this organisation, you acknowledge you have read, understood, and agree to be bound by these these agreements:

Terms of Service, Privacy Policy, Cookie Policy, E-Sign Consent, DMCA, Imprint

Optional Checklist

The following items are optional but might be requested in certain cases.

  • I have tested it locally
  • I have reviewed and updated any documentation if relevant
  • I am providing new code and test(s) for it

Comment thread usr/bin/whonix-gateway-firewall Outdated
Comment thread usr/bin/whonix-gateway-firewall
Comment thread usr/bin/whonix-workstation-firewall
Comment thread usr/bin/whonix-workstation-firewall Outdated
Comment thread usr/bin/whonix-gateway-firewall
Comment on lines +217 to +218
## fd09:24ef:4179::a89/112 - persistent Qubes-Whonix-Gateway IP range
## fd09:24ef:4179::a8a/112 - DispVM Qubes-Whonix-Gateway IP range

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## fd09:24ef:4179::a89/112 - persistent Qubes-Whonix-Gateway IP range
## fd09:24ef:4179::a8a/112 - DispVM Qubes-Whonix-Gateway IP range
## fd09:24ef:4179::a89:/112 - persistent Qubes-Whonix-Gateway IP range
## fd09:24ef:4179::a8a:/112 - DispVM Qubes-Whonix-Gateway IP range

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixing post-merge.

## Would fail if netvm is set to 'none',
## which is the case in Qubes R4 TemplateVMs.
[ -n "${GATEWAY_IP:-}" ] || GATEWAY_IP="$(qubesdb-read /qubes-gateway 2> /dev/null)" || GATEWAY_IP="127.0.0.1"
[ -n "${GATEWAY_IP6:-}" ] || GATEWAY_IP6="::ffff:$(qubesdb-read /qubes-gateway6 2> /dev/null)" || GATEWAY_IP6="::1"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I misunderstood something, but I was under the impression that the /qubes-gateway6 qubesdb entry contained an IPv6 address. This looks like it's being used as an IPv4 address though.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines 337 to +343
if [ -n "$SYSTEMCHECK_USER" ]; then
$nftables_cmd add rule inet filter output skuid "$SYSTEMCHECK_USER" inet daddr 127.0.0.1 counter accept
$nftables_cmd add rule inet filter output skuid "$SYSTEMCHECK_USER" ip daddr 127.0.0.1 counter accept
$nftables_cmd add rule inet filter output skuid "$SYSTEMCHECK_USER" ip6 daddr ::1 counter accept
$nftables_cmd add rule inet filter output skuid "$SYSTEMCHECK_USER" inet daddr "$GATEWAY_IP" counter accept
$nftables_cmd add rule inet filter output skuid "$SYSTEMCHECK_USER" inet daddr "$GATEWAY_IP6" counter accept
$nftables_cmd add rule inet filter output skuid "$SYSTEMCHECK_USER" inet daddr "$GATEWAY_IP_HARDCODED" counter accept
$nftables_cmd add rule inet filter output skuid "$SYSTEMCHECK_USER" inet daddr "$GATEWAY_IP6_HARDCODED" counter accept

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How come the loopback address rule had the inet part split into ip and ip6, but the GATEWAY_IP(6) and GATEWAY_IP_HARDCODED(6) rules weren't?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed this to use ip and ip6 since the rest of the file seems to do the same.

@adrelanos
adrelanos merged commit 1c92145 into Whonix:master Sep 13, 2025
adrelanos pushed a commit that referenced this pull request May 15, 2026
…ons-IQwcy

workflow triggers: normalize to push(master) + pull_request(master) + workflow_dispatch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants